-- card: 7445 from stack: in.0 -- bmap block id: 0 -- flags: 4000 -- background id: 2612 -- name: EnableMenu -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=82 top=302 right=324 bottom=182 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Install ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put (long name of this stack) into sourceStack delete first word of sourceStack delete first character of sourceStack delete last character of sourceStack put "Select a stack to copy this resource into." put filename("STAK") into fname if fname is empty then hide message window exit mouseup end if if sourcestack=fname then beep Answer "Get real. You can't install it in this stack" hide message window exit mouseup end if -- ModResCopy sourceStack,fname,"XCMD","EnableMenu" -- get the result if first char of it is "E" then put it into the message box beep answer "Attempt to install resource has failed." else beep answer "Resource installation successful" end if hide message window end mouseUp -- part contents for background part 13 ----- text ----- 12 -- part contents for background part 2 ----- text ----- EnableMenu -- part contents for background part 3 ----- text ----- EnableMenu lets you enable and disable items in menus you've created using the NewMenu* XFCN. Examples: EnableMenu myMenu, 1, FALSE EnableMenu myMenu, 3, (the userLevel>2) The first example will always disable the first menu item in the menu "myMenu". The second example will disable the third item in "myMenu" IF the userLevel is greater than 2. Passing an item number of 0 (zero) will enable or disable the ENTIRE menu. ••• All the credit, (even the descriptions above) go to the creator of this ingenious XCMD: Nine to Five Software Company P.O. Box 915 Greenwood, IN 46142 (317) 887-2154 & Michael Long See also NewMenu*, CheckMenu*, DeleteMenu*, ChangeMenu*, and ShowMenu* -- part contents for background part 10 ----- text ----- Syntax: EnableMenu , ,TRUE/FALSE is the id number of the menu returned by the call to newMenu. is this menu item (counting from the top with the 0 being the item name.)